package com.chixing.day08_interface;
/*
    interface CompareTo<T>{
        比较两个对象
    }
*/
public class InterfaceDemo {
    public static void main(String[] args) {
        String s1 = "file";
        String s2 = "edit";
        int result = s1.compareTo(s2);
        System.out.println(result);

        Product product1 = new Product("杯子",600,20);
        Product product2 = new Product("被子",600,20);
        int result2 = product1.compareTo(product2);
        System.out.println(result2);

    }

}
